<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>新的全局常量</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="migration81.new-functions.html">« 新函数</a></li>
      <li style="float: right;"><a href="migration81.incompatible.html">不向后兼容的变更 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="migration81.html">从 PHP 8.0.x 移植到 PHP 8.1.x</a></li>
    <li>新的全局常量</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="migration81.constants" class="sect1">
 <h2 class="title">新的全局常量</h2>

 <div class="sect2" id="migration81.constants.curl">
  <h3 class="title">cURL</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_DOH_URL</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_ISSUERCERT_BLOB</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_PROXY_ISSUERCERT</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_PROXY_ISSUERCERT_BLOB</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_PROXY_SSLCERT_BLOB</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_PROXY_SSLKEY_BLOB</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_SSLCERT_BLOB</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>CURLOPT_SSLKEY_BLOB</code></strong></span>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.gd">
  <h3 class="title">GD</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>IMG_AVIF</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>IMG_WEBP_LOSSLESS</code></strong></span>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.mysqli">
  <h3 class="title">MySQLi</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>MYSQLI_REFRESH_REPLICA</code></strong></span>
    <p class="para">
     与上游 MySQL 的变化保持一致，这个常量被添加来取代 <strong><code>MYSQLI_REFRESH_SLAVE</code></strong>。由于向后兼容的原因，旧的常量仍然可用，但在未来可能会被废弃/删除。
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.pcntl">
  <h3 class="title">PCNTL</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>PRIO_DARWIN_BG</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>PRIO_DARWIN_THREAD</code></strong></span>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.posix">
  <h3 class="title">POSIX</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>POSIX_RLIMIT_KQUEUES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>POSIX_RLIMIT_NPTS</code></strong></span>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.sockets">
  <h3 class="title">Sockets</h3>

  <p class="para">
   如果支持以下套接字选项的话，它们将会被定义：
  </p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>SO_ACCEPTFILTER</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SO_DONTTRUNC</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SO_WANTMORE</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SO_MARK</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>TCP_DEFER_ACCEPT</code></strong></span>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.sodium">
  <h3 class="title">Sodium</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES</code></strong></span>
   </li>
   <li class="listitem">
    <span class="simpara"><strong><code>SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES</code></strong></span>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration81.constants.tokenizer">
  <h3 class="title">Tokenizer</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara"><strong><code>T_READONLY</code></strong></span>
   </li>
  </ul>
 </div>

</div></div></div></body></html>